<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>SlideShow</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Language" content="fr"/>
<link rel="stylesheet" type="text/css" href="slideshow.css"/>
<script type="text/javascript" src="slideshow.js"></script>
<style type="text/css">

</style>
<script type="text/javascript">//<![CDATA[

<?php

$files = dirlist_array("Totemtrip");

echo "var images = ".json_encode($files);
?>
//]]></script>

</head>
<body>


<div>
<div id="imageZone">

</div>

<div id="arrows"><span id="arrowLeft">&lt;&lt;&lt;</span> <span id="arrowRight">&gt;&gt;&gt;</span></div>
<ul id="slideList"></ul>
</div>

</body>
</html>
<?php

function dirlist_array($dir,$lvl=0)
{
if (is_dir($dir) && ($dh = opendir($dir)))
   {
    while ( false !== ($file = readdir($dh)) ){ 
    	if ($file && $file!='..' && $file!='.'){
	    	$dirlist[]=$dir.'/'.$file;
		if ($lvl>0 && is_dir($dir.'/'.$file))
	$dirlist=array_merge ( $dirlist,dirlist_array($dir.'/'.$file,$lvl-1));
		}
		}
   closedir($dh);
   @sort($dirlist);
   return $dirlist;
   }
else
	return false;
}

?>
